//
// Created by 33145 on 2023/6/6.
//

#ifndef ROCKET_ABSTRACT_PROTOCOL_H
#define ROCKET_ABSTRACT_PROTOCOL_H

#include <memory>
#include <string>

namespace rocket {

  struct AbstractProtocol : public std::enable_shared_from_this<AbstractProtocol> {
  public:
    typedef std::shared_ptr<AbstractProtocol> ptr;

    virtual ~AbstractProtocol() = default;

    std::string getReqId() const { return _msg_id; };
    void setReqId(const std::string& value) { _msg_id = value; }

  public:
    std::string _msg_id;     // 请求号，唯一标识一个请求或者响应
  };

}


#endif //ROCKET_ABSTRACT_PROTOCOL_H
